package learn_design_patterns.c1;

import learn_design_patterns.c1.behaviors.fly.FlyRocketPowered;
import learn_design_patterns.c1.ducks.DecoyDuck;
import learn_design_patterns.c1.ducks.MallardDuck;
import learn_design_patterns.c1.ducks.ModelDuck;
import learn_design_patterns.c1.ducks.RedheadDuck;
import learn_design_patterns.c1.ducks.RubberDuck;

public class MiniDuckSimulator {

	public static void main(String[] args) {
		System.out.println("---MallardDuck---");
		Duck mallardDuck = new MallardDuck();
		mallardDuck.performFly();
		mallardDuck.performQuack();
		mallardDuck.display();
		mallardDuck.swim();
		System.out.println();

		System.out.println("---RedheadDuck---");
		Duck redheadDuck = new RedheadDuck();
		redheadDuck.performFly();
		redheadDuck.performQuack();
		redheadDuck.display();
		redheadDuck.swim();
		System.out.println();

		System.out.println("---DecoyDuck---");
		Duck decoyDuck = new DecoyDuck();
		decoyDuck.performFly();
		decoyDuck.performQuack();
		decoyDuck.display();
		decoyDuck.swim();
		System.out.println();

		System.out.println("---RubberDuck---");
		Duck rubberDuck = new RubberDuck();
		rubberDuck.performFly();
		rubberDuck.performQuack();
		rubberDuck.display();
		rubberDuck.swim();
		System.out.println();
		
		System.out.println("---ModelDuck---");
		Duck modelDuck = new ModelDuck();
		modelDuck.performFly();
		modelDuck.performQuack();
		modelDuck.display();
		modelDuck.swim();
		System.out.println("update......");
		modelDuck.setFlyBehavior(new FlyRocketPowered());
		modelDuck.performFly();
		
		System.out.println();
	}

}
